<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="wangyuguo">
<title>解除授权</title>
<script type="text/javascript" language="JavaScript" src="../script/common.js"></script>
<script type="text/javascript" language="JavaScript" src="../script/tree.js"></script>
<script type="text/javascript" language="JavaScript">
//全局变量
var org = null;
//当前单位
var qt = {};
//数据表格对象
var tree;
var groupId;
function load() {
    Eui.showNavigation();
    setPages(["roleview","listview","detview"])
    org = Common.cOrg();
    Common.initDict(searchForm.enabled, "enable_status", "全 部");		//初始化状态(查询form)
    searchForm.organization.value = org.id
    createTable()
}

/**查询部分**/

//生成表格，创建QueryTable对象
function createTable() {
    var columns = [];
    columns[0] = {render:nameFunc}
    columns[4] = {render:function(v, r) {
	        return "<a href=# onclick='showRole(\"" + r[5] + "\")'>" + (v ? v : "无") + "</a>"
	    }}
    columns[5] = {title:"操作",order:false,render:function(v, r) {
	        return "<a href=# onclick='onDelete(" + r[6] + ",\"" + r[0] + "\")'>解除授权</a>"
	    }}
    
    qt = new QueryTable("removeacl", "searchForm", "datalist", columns);
}

//数据处理方法
function nameFunc(v, r) {//处理数据 点姓名进入查看页面
    return "<a href=# onclick=\"onView(" + r[7] + ");return false;\">" + v + "</a>"
}

function operFunc(v, r) {
    return "<a href=# onclick=\"onEdit(" + r[0] + ");return false;\">编辑</a> <a href=# onclick=\"changePwd('" + r[3] + "','" + r[1] + "');return false;\">修改密码</a>"
}

/**明细部分**/
//显示明细页面和数据
function onView(id) {
	switchPage("detview");
	SystemMgnt.showOperator("opergroupview",id)
}

/**其他页面功能**/
function onDelete(id, name) {
    if (showQuestion("是否删除对【" + name + "】的授权?")) {
        DWR.call("partyService.deleteGroupMember", id, function() {
            showInformation("成功解除对【" + name + "】的授权！");
            qt.showTable();
        },{blockScreen:true});
    }
}

/**查看角色明细**/
function showRole(id) {
	switchPage("detview");
	SystemMgnt.showGroup("opergroupview",id);
}

</script>
</head>
<body onload="load()">
<div class="nav"><div id="nav">&nbsp;</div></div>

<div id="listview">
    <div class="searchForm">
        <form id="searchForm" name="searchForm">
            <input type="hidden" name="organization"/>
            <table cellSpacing="0" cellPadding="4" width="100%" border="0">
                <tr>
                    <td><label>姓 名</label> <input type="text" name="name" maxlength="20"/></td>
                    <td><label>操作员编码</label> <input type="text" name="uniqueId" maxlength="18"
                                                   onblur="checkV(this,'number')"></td>

                    <td><label>帐 号</label> <input type="text" name="loginName" maxlength="20"/></td>
                    <td><label>状 态</label> <select name="enabled">
                        <option></option>
                    </select></td>
                    <td><button type="button" onclick="qt.showTable()">查 询</button></td>
                </tr>
            </table>
        </form>
    </div>
    <div id="datalist"></div>
</div>
<div id="detview" style='display:none;'>
	<div id="opergroupview"></div>
	<p>
		<button type="button" onclick="switchPage('listview');">返 回</button>
	</p>
</div>
</body>
</html>
